//
//  Expense.m
//  Wallets Manager
//
//  Created by Nguyen Chi Cong on 9/26/12.
//  Copyright (c) 2012 BKHN. All rights reserved.
//

#import "Expense.h"
#import "Plan.h"
#import "DataBaseAccess.h"

@implementation Expense

@dynamic e_name;
@dynamic e_amount;
@dynamic e_date;
@dynamic e_notes;
@dynamic eToExpenseType;
@dynamic eToPlan;

-(void)moveTransactionToPlan: (NSString *)pName
{
    Plan *plan = [DataBaseAccess planForName:pName];
    self.eToPlan = plan;
}

-(void)moveTransactionToType: (NSString *)tName
{
    ExpenseType *et = [DataBaseAccess eTypeForName:tName];
    self.eToExpenseType = et;
}

@end
